Repository navigation
fix: give each request a time limit, and let the user cancel an upload - #527
Merged
Merged
Conversation
…no cancel A hung Server keeps a request of the BFF for 100 s, a request of the SPA with no answer waits with no end, and the upload has no Cancel button. These tests fail until the fix.
The BFF forwarder waits Bff:Proxy:ActivityTimeout (30 s) with no progress, and Bff:Proxy:UploadActivityTimeout (5 min) for a multipart form, in place of the 100 s default of YARP. A table maps each content type to its limit, and routing picks the forwarder by Content-Type. apiClient stops a request after 35 s, and an upload after 10 min, so the 504 of the BFF comes first. A 504 and a stopped request show timedOutMessage. The Files section shows Cancel upload while an upload is on the way. A cancel aborts the request and shows no message.
…cepts metadata makes
Owner
Author
|
Review gate (thermo-nuclear review, opus): no high or medium findings. Low findings that stay open, with reasons:
Fixed after the review: docs/messages.md, docs/frontend.md, and docs/backend/attachments.md now name the time-out message and the Cancel upload button. |
…the default limits The BFF test sets Bff:Proxy:ActivityTimeout to 1 s, and the functional test cuts the browser time limit of the claim request to 1 s. A BFF test and the unit test of the SPA pin the defaults of 30 s, 5 min, 35 s, and 10 min.
Owner
Author
|
The two slow tests in the low findings are fixed in d6b71c6. The BFF hang test sets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A hung Server or a dropped network kept the SPA pending with no end. An upload had no cancel. Now each request has a time limit at the BFF and in the SPA, and the user can cancel an upload.
What changed
Bff:Proxyoptions, one row per content type). A request that reaches its limit gets a 504.Scope
Tradeoffs
Attachments:AddTimeout, because main has no such setting. When feat(server): sweep the objects that no row names #526 lands, set the BFF value from it.Blast Radius
The change touches all proxied API calls. A Server call that sends no bytes for 30 s now fails with a 504. The Server has no streaming or long-poll endpoint today.
Verification
--repeat-each=10.Bff:Proxy:ActivityTimeoutto 1 s (30 s before, now 1.8 s). The Playwright claim test cuts the browser limit of the claim request to 1 s withshortenRequestTimeLimit(36.1 s before, now 1.5 to 2.5 s). The browser counts the XHR limit, sopage.clockcannot reach it. A BFF test and the SPA unit test pin the defaults: 30 s, 5 min, 35 s, and 10 min. With the limit code removed, each shortened test fails.pnpm lint,pnpm build,pnpm test(874 tests),join.spec.tswith--repeat-each=10(540 of 540), andpnpm test:e2e(360 tests) pass.